<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>

    const m1 = new Map();
    m1.set("name", "张三");
    m1.set("age", 18);
    m1.set('address', '广州市');

    console.log(m1);

    // forof遍历m1
    for (let item of m1) {
        console.log(item);
    }

    for (let [index, value] of m1) {
        console.log(index, value);
    }



</script>

</html>